<?php

namespace hook;
use core\Request;
use core\Response;

class CheckMethod
{
    public static function run(&$class)
    {
        $method = isset($class::$_method) ? $class::$_method : '';
        Request::get('method') == $method || Response::send(405);
    }
}
